package mock.servicesdirectory.dao.daointerface;

import java.util.ArrayList;
import java.util.List;


import mock.servicesdirectory.web.model.OrganisationList;


public class OrganisationListDAO {
	 private static List<OrganisationList> OrganisationListLst=new ArrayList<OrganisationList>();
	 static int total=50;
	 static {
	        for(int i=1;i<total;i++)
	        {
	        	
	        	OrganisationListLst.add(new OrganisationList("Organisation "+i,"Address "+i,"Postcode "+i,"Contact "+i,"Is Active"));
	        }
	    }
		public static int nextInt(){
			return total++;
		}
		
		public static List<OrganisationList> buildList(){
			return OrganisationListLst;
		}
		
		public static int count(){
			return OrganisationListLst.size();
		}
		
		public static List<OrganisationList> find(int from,int to){
			return OrganisationListLst.subList(from, to);
		}
		
		public static OrganisationList findById(Integer id){
			
			return null;
		}
		
		public static void save(OrganisationList org){
			OrganisationListLst.add(org);
		}
		
		public static void update(OrganisationList org){
			
		}
		
		public static void delete(OrganisationList org){
			OrganisationListLst.remove(org);
		}
		public static List<OrganisationList> findNotById(int id,int from,int to){
			List<OrganisationList> subLst =  OrganisationListLst.subList(from,to);
			List<OrganisationList> temp = new ArrayList<OrganisationList>();
			
			return temp;
		}
		
		 public static List<OrganisationList> findLesserAsId(int id, int from,int to)
		    {
		        List<OrganisationList> subLst= OrganisationListLst.subList(from, to);
		        List<OrganisationList> temp=new ArrayList<OrganisationList>();

		       
		        return temp;
		    }
		    public static List<OrganisationList> findGreaterAsId(int id, int from,int to)
		    {
		    	  List<OrganisationList> subLst=OrganisationListLst.subList(from, to);
			      List<OrganisationList> temp=new ArrayList<OrganisationList>();

		        
		        return temp;
		    }
}
